package com.yi.mall.demo.service.Impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yi.mall.demo.mapper.UserInfoMapper;
import com.yi.mall.demo.pojo.UserInfo;
import com.yi.mall.demo.service.IUserUserInfoService;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.sql.Wrapper;
import java.util.List;

@Service
public  class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements IUserUserInfoService {

    public UserInfo getUserInfoById(Long id) {
        LambdaQueryChainWrapper<UserInfo> Wrapper = new LambdaQueryChainWrapper<>(this.baseMapper);
        UserInfo userinfo = Wrapper.eq(UserInfo::getId, id)
                .orderByDesc(UserInfo::getId)
                .one();


        return userinfo;
    }
}
